<?php
// No direct access to this file
defined('_JEXEC') or die;
 
/**
 * iTOEstate component helper.
 */
abstract class iTOEstateHelper
{
	/**
	 * Configure the Linkbar.
	 */
	public static function addSubmenu($submenu) 
	{
		// adding submenu items
		JSubMenuHelper::addEntry(
			JText::_('COM_ITOESTATE_SUBMENU_LISTINGS'),
		    'index.php?option=com_itoestate&view=listings', 			
			$submenu == 'listings'
		);
		
		JSubMenuHelper::addEntry(
			JText::_('COM_ITOESTATE_SUBMENU_CATEGORIES'),
			'index.php?option=com_itoestate&view=categories',
		    $submenu == 'categories'
		);
		
		JSubMenuHelper::addEntry(
			JText::_('COM_ITOESTATE_SUBMENU_TYPES'),
		    'index.php?option=com_itoestate&view=types',
		    $submenu == 'types'
		);
		
		JSubMenuHelper::addEntry(
			JText::_('COM_ITOESTATE_SUBMENU_LOCATIONS'),
		    'index.php?option=com_itoestate&view=locations',
		    $submenu == 'locations'
		);		
								 
		// set some global property
		$document = JFactory::getDocument();
		
		if ($submenu == 'listings') 
		{
			$document->addStyleDeclaration('.icon-48-itoestate ' .
		                               '{background-image: url(../media/com_itoestate/images/icon-48-itoestate.png);}');			
		}
	}
}